<include file="__THEME__/header" />
<include file="__THEME__/page_top" />
<div class="w_970 ov m_b40">
	<div class="fl w_720">
    	<h2 class="t_26 c_333 p_t25 bold_n m_b20">{$user_info['uname']}发布</h2>
        <h3 class="t_14 p_b10 bold_n c_666 b_b">发布你最新的展示</h3>
        <form id="ajax_content_form" method="POST" action="{:U('public/space/save')}">
        <div class="space_tz p_t20">
        	<ul class="">
            	<li><input id="title" name="title" type="text" value="" class="iut c_999 b_e6e6e6 m_b15 w_455" placeholder="取个高端大气的标题"></li>
                <li>
                	{:W('Editor',array('width'=>'470','height'=>'400','contentName'=>'content','value'=>''))}
                </li>
                <li><input id="tag_names" name="tag_names" type="text" value="" class="iut c_999 b_e6e6e6 m_b5 w_455" placeholder="添加标签">
                	<p class="m_b40 c_999">多个标签用，号隔开</p>
                </li>
                <li>
                	<a class="tc butas bor di b_fff w_255 c_f06" 
                		href="javascript:;" onclick="$('#ajax_content_form').submit();">发布</a>
                </li>
         	</ul>
       </div>
       </form>
    </div>
    <div class="w_220 fr p_t25">
    	<div style="padding-top:45px" class="b_b m_b15 t_14 l_35">发布有什么问题吗？</div>
    	<p class="c_666 l_20 m_b40">有关发布的更多信息，请查看<a href="#" class="c_009">我们的常见问题</a>。</p>
    </div>    
</div>
<script>
$(document).ready(function() { 
    $('#ajax_content_form').submit(function(){
        $(this).ajaxSubmit({
            beforeSubmit:  function(){
            	if($('#title').val().length == 0) {
            		ui.error('标题不能为空');
                    return false;
                }
            	if(E.getText().length == 0) {
            		ui.error('内容不能为空');
                    return false;
                }
            	if($('#tag_names').val().length == 0) {
            		ui.error('标签不能为空');
                    return false;
                }
            },
            success: function(json){
            	if( json.status == 1 ){
            		ui.success(json.info);
            		window.location = json.data.jumpUrl;
            	}else{
            		ui.error(json.info);
            	}
            },
            dataType: 'json'
        }); 
        return false; 
    });
})
</script>
<include file="__THEME__/footer" />
</body>
</html>
